import axios from "@/utils/request";
enum API {
	HOSPITIAL_URL = '/api/v1/hospital/searchPage',// 获取医院信息
	ADDHOSPITIAL_URL = '/api/v1/hospital/add',// 添加医院信息
	EDITHOSPITIAL_URL = '/api/v1/hospital/detail',// 编辑医院信息
	CONFIRMHOSPITIAL_URL = '/api/v1/hospital/update',// 提交医院信息
}

// 获取医院信息列表
export const reqHospitialList = (data: any) => {
	return axios({
		url: API.HOSPITIAL_URL,
		method: 'post',
		data,
	})
}
// 新增医院
export const reqAddHospitial = (data: any) => {
	return axios({
		url: API.ADDHOSPITIAL_URL,
		method: 'post',
		data,
	})
}
// 编辑医院信息
export const reqEditHospitial = (id: any) => {
	return axios({
		url: API.EDITHOSPITIAL_URL + '?' + `hospitalId=${id}`,
		method: 'get',
	})
}

// 提交医院信息
export const reqConfirmHospital = (data: any) => {
	return axios({
		url: API.CONFIRMHOSPITIAL_URL,
		method: 'post',
		data,
	})
}